<!DOCTYPE html>
<html>
<head>
    <title>Admin</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link  href="<?=base_url();?>css/admin.css" rel="stylesheet" type="text/css" />
	<link href="<?=base_url();?>public/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?=base_url();?>public/css/flexigrid.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=base_url();?>public/js/jquery.pack.js"></script>
<script type="text/javascript" src="<?=base_url();?>public/js/flexigrid.pack.js"></script>
</head>
<body>

 <div id="contentright">
        <div id="search">
          <div id="searchblank">
            <div id="searchinput">
             Welcome, admin
            </div>
          
            <div id="advancesearch"><a href="#" class="advancesearch">Logout</a></div>
          </div>
        </div>
        </div>
    <div id="main">
        <div id="header">
            <a href="#" class="logo"><img src="img/UBE-logo.png" width="126" height="111" alt="" /></a>  
          <ul id="top-navigation">
                <li><a href="/index.html" class="active">Dashboard</a></li>
                <li><a href="/index-form.html">Members</a></li>
                <li><a href="#">Lands</a></li>
                <li><a href="#">Supplies</a></li>
                <li><a href="#">Statistics</a></li>
                <li><a href="#">Settings</a></li>
              
            </ul>
            
            
            
            
        </div>
        <div id="middle">
            <div id="left-column">
                <h3>Header</h3>
                <ul class="nav">
                    <li><a href="#">จำนวนเกษตรกร 1,000 คน</a></li>
                    <li><a href="#">พื้นที่รวม 1,700.5 ไร่</a></li>
                    <li><a href="#">ปริมาณผลผลิต 50,000 ตัน</a></li>
                    <li><a href="#">รวมซื้อวัตถุดิบ 30,000,000 บาท</a></li>
                    <li><a href="#">ราคามันเฉลี่ย 6.75 บาท</a></li>
                    <li><a href="#">คุณภาพแป้งเแลี่ย 100%</a></li>
                </ul>
                <a href="#" class="link">Link here</a>
                <a href="#" class="link">Link here</a>
            </div>
            <div id="center-column">
               <?php
echo $js_grid;
?>
<script type="text/javascript">

function test(com,grid)
{
    if (com=='Select All')
    {
		$('.bDiv tbody tr',grid).addClass('trSelected');
    }
    
    if (com=='DeSelect All')
    {
		$('.bDiv tbody tr',grid).removeClass('trSelected');
    }
    
    if (com=='Delete')
        {
           if($('.trSelected',grid).length>0){
			   if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){
		            var items = $('.trSelected',grid);
		            var itemlist ='';
		        	for(i=0;i<items.length;i++){
						itemlist+= items[i].id.substr(3)+",";
					}
					$.ajax({
					   type: "POST",
					   url: "<?=site_url("/ajax/deletec");?>",
					   data: "items="+itemlist,
					   success: function(data){
					   	$('#flex1').flexReload();
					  	alert(data);
					   }
					});
				}
			} else {
				return false;
			} 
        }          
} 
</script>
<table id="flex1" style="display:none"></table>
            </div>
            <div id="right-column">
                <strong class="h">Quick Info</strong>
                <div class="box">This is your admin home page. It will give you access to all things within the back end system that you will need to facilitate a smooth operation.</div>
            </div>
        </div>
        <div id="footer"><p>Developed by <a href="http://twitter.com/umutm">Umut Muhaddisoglu</a> 2008. Updated for HTML5/CSS3 by <a href="http://mediagearhead.com">Giles Wells</a> 2010.</p></div>
    </div>
</body>
</html>